package model

import "gorm.io/gorm"

type Room struct {
	gorm.Model
	MakeRoomUserId uint   `gorm:"type:bigint(20);not null;comment:建群人的用户id"`
	RoomName       string `gorm:"type:varchar(20);not null;comment:群名称"`
}

type RoomUser struct {
	gorm.Model
	RoomUserId uint `gorm:"type:bigint(20);not null;comment:群成员的用户id"`
	UserType   int  `gorm:"type:int(10);not null;comment:群成员状态 1:群主 2:管理员 3:成员"`
	RoomId     uint `gorm:"type:bigint(20);not null;comment:群id"`
}

type ChatHistory struct {
	gorm.Model
	SendMsgUserId uint   `gorm:"type:bigint(20);not null;comment:发送消息的用户id"`
	MsgContent    string `gorm:"type:varchar(255);not null;comment:消息内容"`
}
